﻿@model IEnumerable<SQLResident.Models.Server>

@{
    ViewBag.Title = "Index";
}
<ul class="breadcrumb">
    <li><a href="@Url.Action("Index","Home")">Inicio</a> <span class="divider">/</span></li>
    <li class="active">Servidores</li>
</ul>
<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            ConnectionString
        </th>
        <th>
            CanBeKilled
        </th>
        <th>
            KillDelayInMinutes
        </th>
        <th>
            ConnectionTimeOut
        </th>
        <th>
            Active
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ConnectionString)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CanBeKilled)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.KillDelayInMinutes)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ConnectionTimeOut)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Active)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ServerId }) |
            @Html.ActionLink("Details", "Details", new { id=item.ServerId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ServerId })
        </td>
    </tr>
}

</table>
